package com.myapplication.helper;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by zhoushikun on 2016/7/7.
 */
public class PreferencesHelper1 {
    public static void setSharedValue(Context context,String name,String key,String values){
        SharedPreferences sharedPreferences = context.getSharedPreferences(name,Context.MODE_PRIVATE);
        sharedPreferences.edit().putString(key,values).apply();
    }

    public static String getSharedValue(Context context,String name,String key){
        SharedPreferences sharedPreferences = context.getSharedPreferences(name,Context.MODE_PRIVATE);
        String shinfo = sharedPreferences.getString(key,"0000");
        return shinfo;
    }
}
